package projectxxx;

public class Stock 
{
	private String stockId=null, barcode=null, stockTypeId=null, brand=null,
				   serialNo=null, description=null, catId=null, title=null,
				   genre=null, releaseDate=null, runTime=null, director=null,
				   actor1=null, actor2=null, status=null, dateLastRented=null,
				   ageRest=null; 	
	
	String [] input;
	
	public Stock(String [] inArray) 
	{
		input = new String [16];
		for(int i = 0; i < input.length; i++)
		{
			input[i] = inArray[i];
			System.out.println(input[i]);
		}
		
		stockId = input[0];
		stockTypeId = input[1];
		title = input[2];
		status = input[3];
		barcode = input[4];
		brand = input[5];
		serialNo = input[6];
		description = input[7];
		catId = input[8];
		runTime = input[9];
		releaseDate = input[10];
		genre = input[11];
		ageRest = input[12];
		director = input[13];
		actor1 = input[14];
		actor2 = input[15];
		dateLastRented = input[16];
			
	}

	public String [] getStockString()
	{
		return input;
	}
	
	public String getStockId()
	{
		return stockId;
	}
	
	public String getBarcode()
	{
		if(barcode.equals(""))
		{
			return null;
		}
		else
		{
			return barcode;
		}
	}
	
	public String getStockTypeId()
	{
		return stockTypeId;
	}
	
	public String getBrand()
	{
		if(brand.equals(""))
		{
			return null;
		}
		else
		{
			return brand;
		}
	}
	
	public String getSerialNo()
	{
		if(serialNo.equals(""))
		{
			return null;
		}
		else
		{
			return serialNo;
		}
	}
	
	public String getDescription()
	{
		if(description.equals(""))
		{
			return null;
		}
		else
		{
			return description;
		}
	}
	
	public String getCatId()
	{
		return catId;
	}
	
	public String getTitle()
	{
		return title;
	}
	
	public String getGenre()
	{
		if(genre.equals(""))
		{
			return null;
		}
		else
		{
			return genre;
		}
		
	}
	
	public String getAgeRest()
	{
		if(ageRest.equals(""))
		{
			return null;
		}
		else
		{
			return ageRest;
		}
		
	}
	
	public String getReleaseDate()
	{
		if(releaseDate.equals(""))
		{
			return null;
		}
		else
		{
			return releaseDate;
		}
	}
	
	public String getRunTime()
	{
		if(runTime.equals(""))
		{
			return null;
		}
		else
		{
			return runTime;
		}
	}
	
	public String getDirector()
	{
		if(director.equals(""))
		{
			return null;
		}
		else
		{
			return director;
		}
	}
	
	public String getActor1()
	{
		if(actor1.equals(""))
		{
			return null;
		}
		else
		{
			return actor1;
		}
	}
	
	public String getActor2()
	{
		if(actor2.equals(""))
		{
			return null;
		}
		else
		{
			return actor2;
		}
	}
	
	public String getStatus()
	{
		return status;
	}
	
	public String getDateLastRented()
	{
		return dateLastRented;
	}
	
	public void setStockId(String stockId)
	{
		this.stockId = stockId;
	}
	
	public void setBarcode(String barcode)
	{
		this.barcode = barcode;
	}
	
	public void setBrand(String brand)
	{
		this.brand = brand;
	}
	
	public void setSerialNo(String serialNo)
	{
		this.serialNo = serialNo;
	}
	
	public void setDescription(String description)
	{
		this.description = description;
	}
	
	public void setTitle(String title)
	{
		this.title = title;
	}
	
	public void setGenre(String genre)
	{
		this.genre = genre;
	}
	
	public void setAgeRest(String ageRest)
	{
		this.ageRest = ageRest;
	}
	
	public void setReleaseDate(String releaseDate)
	{
		this.releaseDate = releaseDate;
	}
	
	public void setRunTime(String runTime)
	{
		this.runTime = runTime;
	}
	
	public void setDirector(String diretor)
	{
		this.director = director;
	}
	
	public void setActor1(String actor1)
	{
		this.actor1 = actor1;
	}
	
	public void setActor2(String actor2)
	{
		this.actor2 = actor2;
	}
	
	public void setDateLastRented(String dateLastRented)
	{
		this.dateLastRented = dateLastRented;
	}
	
}
